package ruifight.member.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;

import ruifight.member.model.AccountRecord;
import ruifight.member.model.AccountRecordExample;
import ruifight.member.service.base.BaseService;

public interface AccountRecordService extends BaseService<AccountRecord, AccountRecordExample, Long>{

    /**
     * 获取交易记录列表
     * @param cur_page
     * @param page_size
     * @param paramMap
     * @return
     */
    public PageInfo<Map<String, Object>> getAccountRecordList(int cur_page, int page_size, Map<String, Object> paramMap);
    /**
     * 下单并记录交易记录
     * @param accountRecord
     * @param callbackUrl
     * @param openId
     * @return
     */
    public String addAccountRecord(AccountRecord accountRecord,String total_fee,String shopType,String out_trade_no,String openId) throws Exception;
    /**
     * 完成订单
     * @param accountRecord
     * @param callbackUrl
     * @param openId
     * @return
     */
    public String finishAccountRecord(AccountRecord accountRecord,Long memberInfoId);

    /**
     * 获取近7天交易量
     * @return
     */
    public List<Map<String, Object>> getTradingVolume();
    /**
     * 获取近7天交易额
     * @return
     */
    public List<Map<String, Object>> getAturnover();

    /**
     * 获取会员累计折扣金额
     * @return
     */
    public Float getCumulativeDiscount(Map<String, Object> paramMap);
    /**
     * 获取店铺累计消费金额
     * @return
     */
    public Float getCumulativeMoney(Map<String, Object> paramMap);
}
